<template>
  <div>
    <span>{{ $t('greeting_hello') }}</span>
    <span>{{ userName }}</span>
    <span v-show="unitName"> | {{ unitName }}</span>
    <span v-show="departmentName"> | {{ departmentName }}</span>
    <span v-show="doctorName"> | {{ doctorName }}</span>
  </div>
</template>

<script>

export default {
  computed: {
    userName: function () {
      return this.$store.state.userInfo.userName
    },
    unitName: function () {
      return this.$store.state.userInfo.unitName
    },
    departmentName: function () {
      return this.$store.state.userInfo.departmentName
    },
    doctorName: function () {
      return this.$store.state.userInfo.doctorName
    }
  },
  data() {
    return {
    }
  },
};
</script>